package com.qfedu.orderitem.controller;

import com.qfedu.fmmall.entity.ShoppingCartVo;
import com.qfedu.orderitem.service.Impl.OrderItemAddServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
public class OrederItemAddController {

    @Autowired
    private OrderItemAddServiceImpl orderItemAddService;

    @PostMapping("/item/save")
    public int addOrderItem(@RequestBody List<ShoppingCartVo> list, String orderId){
        return orderItemAddService.save(list,orderId);
    }

}
